You are sneaky!
Quarto is an open-source scientific and technical publishing system that builds on standard markdown with features essential for scientific communication.
Literate programming system in the tradition of Org-Mode, Weave.jl, R Markdown, iPyPublish, Jupyter Book, etc.
---
title: "matplotlib demo"
format:
html:
code-fold: true
jupyter: python3
---
For a demonstration of a line plot on a polar
axis, see @fig-polar.```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
subplot_kw = {'projection': 'polar'}
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```Can be rendered to dozens of output formats with Quarto (via Pandoc):
| Feature | R Markdown | Quarto |
|---|---|---|
| Basic Formats | ||
| Beamer | ||
| PowerPoint | ||
| HTML Slides | ||
| Advanced Layout |
| Feature | R Markdown | Quarto |
|---|---|---|
| Cross References | ||
| Websites & Blogs | ||
| Books | ||
| Interactivity | Shiny Documents | Quarto Interactive Documents |
| Paged HTML | pagedown | Coming soon! |
| Journal Articles | rticles | Out and more coming! |
| Dashboards | flexdashboard | Coming soon! |
Quarto® is an open-source scientific and technical publishing system built on Pandoc.
Rendering (execute and write to disk):
For execution of R, Quarto uses knitr as the engine, but for Python Quarto natively executes Python with Jupyter kernels such as IPython.
{python} executable cells are present. You can set a specific kernel via the YAML:IPython executes Python code and transforms it to plain text, graphics, markdown, HTML, etc.
For interactive sessions, Quarto keeps the Jupyter Kernel resident as a daemon to mitigate startup times.
.qmd is a plain text fileCode
Plain text workflow (.qmd uses Jupyter kernel to execute cells):
Notebook workflow (defaults to using existing stored computation):
.ipynb?You can keep using them! You get to choose whether to use the stored computation OR re-execute the document from top to bottom.
Quarto can help convert back and forth between plain text .qmd and .ipynb - kind of like jupytext but specific to Quarto:
quarto convert --help
Usage: quarto convert <input>
Description:
Convert documents to alternate representations.
Convert notebook to markdown: quarto convert doc.ipynb
Convert markdown to notebook: quarto convert doc.qmd
Convert notebook to markdown, write to file: quarto convert doc.ipynb --output doc.qmdBoth RStudio and VSCode with the Quarto extension have rich auto-completion